package com.freemodbus4j.core.thread;

import java.util.concurrent.ThreadFactory;

public class DefaultExecutorServiceFactory implements ThreadFactory {

    private String threadName;

    public DefaultExecutorServiceFactory(String threadName) {
        this.threadName = threadName;
    }

    @Override
    public Thread newThread(Runnable r) {
        return new Thread(r, "threadName-" + threadName);
    }
}
